package io.renren.modules.user.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.user.dao.TPeopleChangeTemporaryDao;
import io.renren.modules.user.entity.TPeopleChangeTemporaryEntity;
import io.renren.modules.user.service.TPeopleChangeTemporaryService;


@Service("tPeopleChangeTemporaryService")
public class TPeopleChangeTemporaryServiceImpl extends ServiceImpl<TPeopleChangeTemporaryDao, TPeopleChangeTemporaryEntity> implements TPeopleChangeTemporaryService {

    @Autowired
    private TPeopleChangeTemporaryDao temporaryDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TPeopleChangeTemporaryEntity> page = this.page(
                new Query<TPeopleChangeTemporaryEntity>().getPage(params),
                new QueryWrapper<TPeopleChangeTemporaryEntity>()
        );

        return new PageUtils(page);
    }

    /**
     * 查询列表
     * @param temporaryEntity
     * @return
     */
   public List<TPeopleChangeTemporaryEntity> getTPeopleTemporary(TPeopleChangeTemporaryEntity temporaryEntity){
            return temporaryDao.getTPeopleTemporary(temporaryEntity);
    }
    /**
     * 删除数据
     */
   public int del(){
       return temporaryDao.del();
    }
    /**
     * 修改状态
     */
   public int updateState(TPeopleChangeTemporaryEntity temporaryEntity){
        return temporaryDao.updateState(temporaryEntity);
    }
    /**
     * 查询  选过之后的
     */
   public List<TPeopleChangeTemporaryEntity> getTPeople(TPeopleChangeTemporaryEntity temporaryEntity){
       return temporaryDao.getTPeople(temporaryEntity);
   }

}